package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.TVideoCommentMapper;
import com.ruoyi.system.domain.TVideoComment;
import com.ruoyi.system.service.ITVideoCommentService;

/**
 * 视频评论Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-09-24
 */
@Service
public class TVideoCommentServiceImpl implements ITVideoCommentService 
{
    @Autowired
    private TVideoCommentMapper tVideoCommentMapper;

    /**
     * 查询视频评论
     * 
     * @param videoCommentId 视频评论主键
     * @return 视频评论
     */
    @Override
    public TVideoComment selectTVideoCommentByVideoCommentId(Long videoCommentId)
    {
        return tVideoCommentMapper.selectTVideoCommentByVideoCommentId(videoCommentId);
    }

    /**
     * 查询视频评论列表
     * 
     * @param tVideoComment 视频评论
     * @return 视频评论
     */
    @Override
    public List<TVideoComment> selectTVideoCommentList(TVideoComment tVideoComment)
    {
        return tVideoCommentMapper.selectTVideoCommentList(tVideoComment);
    }

    /**
     * 新增视频评论
     * 
     * @param tVideoComment 视频评论
     * @return 结果
     */
    @Override
    public int insertTVideoComment(TVideoComment tVideoComment)
    {
        tVideoComment.setCreateTime(DateUtils.getNowDate());
        return tVideoCommentMapper.insertTVideoComment(tVideoComment);
    }

    /**
     * 修改视频评论
     * 
     * @param tVideoComment 视频评论
     * @return 结果
     */
    @Override
    public int updateTVideoComment(TVideoComment tVideoComment)
    {
        tVideoComment.setUpdateTime(DateUtils.getNowDate());
        return tVideoCommentMapper.updateTVideoComment(tVideoComment);
    }

    /**
     * 批量删除视频评论
     * 
     * @param videoCommentIds 需要删除的视频评论主键
     * @return 结果
     */
    @Override
    public int deleteTVideoCommentByVideoCommentIds(Long[] videoCommentIds)
    {
        return tVideoCommentMapper.deleteTVideoCommentByVideoCommentIds(videoCommentIds);
    }

    /**
     * 删除视频评论信息
     * 
     * @param videoCommentId 视频评论主键
     * @return 结果
     */
    @Override
    public int deleteTVideoCommentByVideoCommentId(Long videoCommentId)
    {
        return tVideoCommentMapper.deleteTVideoCommentByVideoCommentId(videoCommentId);
    }
}
